
package com.bstek.urule.model.rete.builder;

import com.bstek.urule.model.rete.BaseReteNode;
import com.bstek.urule.model.rule.lhs.BaseCriterion;
import com.bstek.urule.model.rule.lhs.Criteria;
import com.bstek.urule.model.rule.lhs.Criterion;

/**
 * @author Jacky.gao
 * @since 2016年9月9日
 */
public class CriteriaBuilder extends CriterionBuilder {
    @Override
    public BaseReteNode buildCriterion(BaseCriterion c, BuildContext context) {
        Criteria criteria = (Criteria) c;
        return buildCriteria(criteria, null, context);
    }

    @Override
    public boolean support(Criterion criterion) {
        return criterion instanceof Criteria;
    }
}
